﻿<?php
('Access-Control-Allow-Origin：*');
include("../config/mysql.php");
$projectName = $_GET["projectName"];
$limit = $_REQUEST['limit'];
$page = $_REQUEST['page'];
$company_id = $_REQUEST['company_id'];
$sql = "select * from prointroduce where company_id = {$company_id} and name like '%{$projectName}%'";
$sql .= ' order by id desc';
$Mysql = new Mysql();

$count = $Mysql->getResultNum($sql);
if ($count > 0) {
	$start = ($page - 1) * $limit;
	$sql .= " limit {$start},{$limit}";
	/*查询表格参数一表明   参数二 查询语句*/
	$arr = $Mysql->likeSelectLayui($sql);
}
/*返回出去*/
if (is_array($arr) == 1) {
	$res = [
		'code' => 0,
		'msg' => '查询成功',
		'count' => $count,
		'data' => $arr
	];
} else {
	$res = [
		'msg' => '没有查到数据',
	];
}
echo json_encode($res, JSON_UNESCAPED_UNICODE);
/*关闭连接*/
$Mysql->close();
